<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/WEB-INF/template/globalTemplate.xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="title">
        ISO9001 Suivi de la Formation
    </ui:define>

    <ui:define name="ariane">
        <h:commandLink action="/faces/index.xhtml"  
                       value="#{msg['application.titre.accueil']}"/>
        >
        Avis sur la formation
    </ui:define>

    <ui:define name="content">
        <f:metadata>
            <f:viewParam name="id" converter="#{sessionConverter}" value="#{avisSessionBean.session}" />
        </f:metadata>

        <h:panelGroup styleClass="titre">Evaluation d'une session</h:panelGroup>

        <h:panelGrid id="eventDetails" columns="2">
            <h:outputLabel value="Formation :" />
            <h:outputLabel value="#{avisSessionBean.session.formation.libelle}" />

            <h:outputLabel value="Description :" />
            <h:outputLabel value="#{avisSessionBean.session.formation.description}" />

            <h:outputLabel value="Debut de la session :"/>
            <h:outputLabel value="#{avisSessionBean.session.dateDebut}">
                <f:convertDateTime pattern="dd/MM/yyyy"/>
            </h:outputLabel>

            <h:outputLabel value="Fin de la session :"/>
            <h:outputLabel value="#{avisSessionBean.session.dateFin}">
                <f:convertDateTime pattern="dd/MM/yyyy"/>
            </h:outputLabel>

            <h:outputLabel value="Salle :"/>
            <h:outputLabel value="#{avisSessionBean.session.salle.libPiece}"/>

            <h:outputLabel value="Instructeur :"/>
            <h:outputLabel value="#{avisSessionBean.session.instructeur.nomComplet}"/>

            <h:outputText value="Competence du formateur :" />  
            <p:rating value="#{avisSessionBean.avis.ratingCompetenceInstructeur}" />  

            <h:outputText value="Ratio théorique / pratique :" />  
            <p:rating value="#{avisSessionBean.avis.ratingRationTheoPrat}" />  

            <h:outputText value="Cette formation me sera-t-elle utile :" />  
            <p:rating value="#{avisSessionBean.avis.ratingUtilite}" />  
        </h:panelGrid>

        <br />
        <p:commandButton  value="Valider" action="#{avisSessionBean.valider()}" update="messages"/>   
    </ui:define>

    <ui:define name="popup">
        popup
    </ui:define>

</ui:composition>
